package com.mentalhealthplatform.appModels;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.mentalhealthplatform.global.rbac.model.Role;
import com.mentalhealthplatform.global.rbac.model.User;
import jakarta.persistence.Column;
import jakarta.persistence.DiscriminatorValue;
import jakarta.persistence.Entity;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.Set;

@Entity
@Getter
@Setter
@DiscriminatorValue("TEACHER")
public class Teacher extends User {
    @Column()
    private String department;
    @Column()
    private String college;
    @Column()
    private String address;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date birthDate;
    @Column()
    private String name;
    @Column()
    private String number;
    @Column()
    private String gender;
//    @Column
//    private String phone;

    @JsonIgnore
    @Override
    public Set<Role> getRoles() {
        return super.getRoles();
    }
}